import type { AddPatientParams, PatientList } from '@/types/patient'
import { request } from '@/utils/request'

// 问诊-添加患者信息
export const addPatientAPI = (data: AddPatientParams) => {
  return request('/patient/add', 'POST', data)
}

// 问诊-获取患者列表
export const getPatientListAPI = () => {
  return request<PatientList[]>('/patient/mylist', 'GET')
}
// 问诊-删除患者信息
export const deletePatientAPI = (id: string) => {
  return request(`/patient/del/${id}`, 'DELETE')
}
// 问诊-获取患者详情
export const getPatientDetailAPI = (id: string) => {
  return request<PatientList>(`/patient/info/${id}`,'GET')
}
// 问诊-编辑患者信息
export const editPatientAPI = ( data: AddPatientParams) => {
  return request('/patient/update', 'PUT', data)
}
